#!/bin/bash
chown root:wheel "/Library/Scripts/logouthook.sh"
chmod 550 "/Library/Scripts/logouthook.sh"
defaults write com.apple.loginwindow LogoutHook "/Library/Scripts/logouthook.sh"